# coding=utf-8
# 代码文件：chapter7/ch7.1.5.6.py

from docx import Document
from docx.oxml.ns import qn
from docx.shared import Pt

document = Document(r'data/K12投资前景分析报告.docx')
all_paras = document.paragraphs

# 遍历所有段落
for paragraph in document.paragraphs:

    # 遍历段落中runs对象
    for run in paragraph.runs:
        run.font.size = Pt(12)
        run.font.name = 'Times New Roman'

        run.element.rPr.rFonts.set(qn('w:eastAsia'), '微软雅黑')

document.save(r'data/K12投资前景分析报告2.docx')

print("结束")
